-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Refactor actions cache to be build on main #20144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
3389f8b
to
f893744
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this looks like an improvement over the current status. There are a couple of other nits I would change, but I would prefer to discuss them after this PR is merged in order to not block it on secondary concerns.
.github/workflows/ci.yml
Outdated
# key won't match, will rely on restore-keys | ||
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
restore-keys: | | ||
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
${{ runner.os }}-stable-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit: I would document that these have to follow the keys in update-caches.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one issue I found with update-caches.yml
, the rest are nits :)
path: | | ||
~/.cargo/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, we should look into caching ~/.cargo/.crates.toml
and ~/.cargo/.crates2.json
, as they track which executables were installed with cargo install
. Not something we need to do now, though, since we don't install anything with cargo install
:)
Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the caching is due to a refactoring, but that could be done separately :)
I'm happy we're improving things though!
@@ -24,6 +25,20 @@ jobs: | |||
- name: Disable audio | |||
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes | |||
run: git apply --ignore-whitespace tools/example-showcase/disable-audio.patch | |||
- uses: actions/cache/restore@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a ton of copy-pasted cache code so every adjustment or fix has to touch a lot of places and you're bound to miss one at some point.
I strongly suggest we create a composite action for that, which could be done directly in this repo, in .github/actions
.
But if you want, it can be tackled in a separate PR :)
Objective
Solution